8497f13baa0467eada1b806d7c7ac522a023d255,iep-rxhttp/src/test/java/com/netflix/iep/http/RxHttpTest.java,RxHttpTest,readTimeoutDoesntRetry,#,471

Before Change



    final CountDownLatch latch = new CountDownLatch(1);
    final AtomicReference<Throwable> throwable = new AtomicReference<>();
    rxHttp.get(uri("/readTimeout")).subscribe(
        Actions.empty(),
        new Action1<Throwable>() {
          @Override public void call(Throwable t) {
            throwable.set(t);
            latch.countDown();
          }
        },
        new Action0() {
          @Override public void call() {
            latch.countDown();
          }
        }
    );

    latch.await();
    Assert.assertTrue(throwable.get() instanceof ReadTimeoutException);

After Change



    final CountDownLatch latch = new CountDownLatch(1);
    final AtomicReference<Throwable> throwable = new AtomicReference<>();
    rxHttp.get(uri("/readTimeout")).subscribe(
        Actions.empty(),
        t -> {
          throwable.set(t);
          latch.countDown();
        },
        () -> latch.countDown()
    );

    latch.await();
    Assert.assertTrue(throwable.get() instanceof ReadTimeoutException);